/*
 * @Description: 新人任务
 * @Author: iamsmiling
 * @Date: 2021-06-12 12:05:25
 * @LastEditTime: 2021-06-12 12:15:58
 */

enum TaskStatus {
  none,
  done,
  ing,
}

extension TaskStatusKit on TaskStatus {
  String get name =>
      {
        TaskStatus.ing: "去完成",
        TaskStatus.done: "已完成",
        TaskStatus.none: "领取"
      }[this] ??
      "";

  String get color =>
      {
        TaskStatus.ing: "#06C3AF",
        TaskStatus.done: "#BBBBBB",
        TaskStatus.none: "#05C0FD"
      }[this] ??
      "";
}

class UserTaskEntity {
  late String icon;
  late String label;

  late String description;

  late String extra;

  late TaskStatus status;

  UserTaskEntity(
      {required this.icon,
      required this.label,
      required this.description,
      required this.extra,
      required this.status});
}
